<?php if(empty($this->file_url)):?>
<div style="display: none;">
<form id="form_upload_iframe" method="post" enctype="multipart/form-data">
    
</form>
</div>
<script>
    var image = parent.getImage();
    image.inject($('form_upload_iframe'));
    $('form_upload_iframe').submit();
</script>
<?php else :?>
    <script>
    parent.showPreviewImage(<?php echo $this->file_id?>,'<?php echo $this->file_url?>');
    parent.addElementImageUpload();
</script>
<?php endif;?>